home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / SimpleFaro.dxr / Internal_3_player bet.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  856 b   |  43 lines

  1. property pType, pAmount, pState, pBet, pBetList
  2.  
  3. on new me, typeOfBet, amountBet, aCardDenomination, winOrLose, theBetList
  4.   me.pType = typeOfBet
  5.   me.pAmount = amountBet
  6.   me.pState = me.mGetBetState()
  7.   me.pBet = me.mSetBet(aCardDenomination, winOrLose)
  8.   me.pBetList = theBetList
  9.   return me
  10. end
  11.  
  12. on mGetBetState me
  13.   if (me.pType = #single) or (me.pType = #set) then
  14.     return #rigid
  15.   else
  16.     if me.pType = #special then
  17.       return #flexible
  18.     end if
  19.   end if
  20. end
  21.  
  22. on mSetBet me, acd, wol
  23.   return [#denomination: acd, #outcome: wol]
  24. end
  25.  
  26. on mRemoveBet me, num
  27.   me.pBetList.deleteProp(num)
  28. end
  29.  
  30. on mAddToAmountBet me, addBet
  31.   pAmount = pAmount + addBet
  32. end
  33.  
  34. on mSubtractFromAmountBet me, sOut
  35.   if pState = #flexible then
  36.     if sOut <= pAmount then
  37.       pAmount = pAmount - sOut
  38.     end if
  39.     if me.pAmount = 0 then
  40.     end if
  41.   end if
  42. end
  43.